package com.realshare.frame.util;

import java.math.BigDecimal;

public class ComUtils {

	/**
	 * <li>功能描述：小数截取。
	 * 
	 * @param value
	 * @param scale
	 * @param roundingMode
	 * @return Float
	 */
	public static Double round(double value, int scale, int roundingMode) {

		BigDecimal bd = new BigDecimal(value);

		bd = bd.setScale(scale, roundingMode);

		Double d = new Double(bd.doubleValue());

		bd = null;

		return d;

	}
}
